From 56d785f78c04153ac8d57396bcfd9845df6f4292 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Wed, 22 Mar 2006 06:50:00 +0000 Subject: [PATCH] Let gdb file format always write all kind of gps data. --- gpsbabel/gdb.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/gpsbabel/gdb.c b/gpsbabel/gdb.c index 3f98f1340..641776c7d 100644 --- a/gpsbabel/gdb.c +++ b/gpsbabel/gdb.c @@ -1572,31 +1572,27 @@ gdb_write_data(void) gdb_hidden = route_head_alloc(); /* contains all written waypts & rtepts */ track_add_head(gdb_hidden); /* tracks comes later and we drop this before */ - if (doing_wpts) - { - waypt_disp_all(gdb_write_waypt_cb); - } - if (doing_rtes) + /* (doing_wpts) */ + + waypt_disp_all(gdb_write_waypt_cb); + + /* (doing_rtes) */ + + gdb_reset_short_handle(); + setshort_defname(gdb_short_handle, "Route"); + if (gdb_via == 0) { - gdb_reset_short_handle(); - setshort_defname(gdb_short_handle, "Route"); - - if (gdb_via == 0) - { - /* find out all route points we have to write as a "HIDDEN CLASS" waypoint */ - route_disp_all(NULL, NULL, gdb_write_rtewpt_cb); - } - route_disp_all(gdb_write_route_cb, NULL, NULL); + /* find out all route points we have to write as a "HIDDEN CLASS" waypoint */ + route_disp_all(NULL, NULL, gdb_write_rtewpt_cb); } - + route_disp_all(gdb_write_route_cb, NULL, NULL); track_del_head(gdb_hidden); /* vaporize our temporary queue */ - if (doing_trks) - { - gdb_reset_short_handle(); - setshort_defname(gdb_short_handle, "Track"); - track_disp_all(gdb_write_track_cb, NULL, NULL); - } + /* (doing_trks) */ + + gdb_reset_short_handle(); + setshort_defname(gdb_short_handle, "Track"); + track_disp_all(gdb_write_track_cb, NULL, NULL); gdb_fwrite_int(2); /* finalize gdb with empty map segment */ gdb_fwrite_str("V", -1); -- 2.30.2